const files = require("../../model/files")

const {result} = require("../../utils")
const {FAILED} = require("../../enumeration/code")
module.exports = async ctx => {
  let res = await files.save(ctx)
  if(res){
    ctx.body = result(res,"上传成功")
  } else {
    ctx.body = result(null,"异常",FAILED)
  }

}
